// 引入axios
import axios from "../../index"
//获取tree结构的列表
function treeList(status, name, type) {
    if (!type) {
        type = 1
    }
    return axios({
        url: '/api/admin/category/list/tree',
        method: 'get',
        params: {
            type,
            status,
            name
        }
    })
}
// 更改分类状态
function UpdateState(id) {
    return axios({
        url: `/api/admin/category/updateStatus/${id}`,
        method: 'get'
    })
}
// 导出
export { treeList, UpdateState }